<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Edit Debt</title>
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='phillfinance.png') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
    <div class="container">
        <h1>Edit Debt</h1>
        <form method="POST" action="{{ url_for('edit_debt', debt_id=debt.id) }}">
            {{ form.hidden_tag() }}
            
            <div class="form-group">
                <label for="amount">Amount:</label>
                {{ form.amount(class="form-control", id="amount") }}
            </div>
            
            <div class="form-group">
                <label for="description">Description:</label>
                {{ form.description(class="form-control", id="description") }}
            </div>

            <div class="form-group cool-date-field">
                <label for="date_added" class="form-label">Date Added:</label>
                {{ form.date_added(class="form-control stylish-input", id="date_added") }}
            </div> <br>
            
            
            <button type="submit" class="btn btn-primary">Update Debt</button>
            <button type="button" class="cancel" onclick="window.location='{{ url_for('view_debts') }}'">Cancel</button>
        </form>
    </div>
</body>
</html>
